package com.huluobo.a2201mvvm_imdemo.conversation;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2201mvvm_imdemo.mvvm.BaseViewModel;
import com.hyphenate.chat.EMConversation;

import java.util.Map;

/**
 * Created by LC on 2024/4/2.
 */
public class ConversationViewModel extends BaseViewModel<ConversationRepo> {
    MutableLiveData<Map<String, EMConversation>> loadConversationsSuccess = new MutableLiveData<>();
    MutableLiveData<String> loadConversationsFailed = new MutableLiveData<>();

    public void loadConversations() {
        repo.loadConversations(loadConversationsSuccess, loadConversationsFailed);
    }

    @Override
    protected ConversationRepo createRepo() {
        return new ConversationRepo();
    }
}
